this._cursorUnfocusInhibited = false;
}
- if (this._cursorVisibilityChangedId) {
- this._cursorTracker.disconnect(this._cursorVisibilityChangedId);
- delete this._cursorVisibilityChangedId;
-
- this._cursorTracker.set_pointer_visible(true);
+ if (this._cursorVisibleInhibited) {
+ this._cursorTracker.uninhibit_cursor_visibility();
+ this._cursorVisibleInhibited = false;
}
}
this._cursorUnfocusInhibited = true;
}
- if (!this._cursorVisibilityChangedId) {
- this._cursorTracker.set_pointer_visible(false);
- this._cursorVisibilityChangedId = this._cursorTracker.connect('visibility-changed', () => {
- if (this._cursorTracker.get_pointer_visible())
- this._cursorTracker.set_pointer_visible(false);
- });
+ if (!this._cursorVisibleInhibited) {
+ this._cursorTracker.inhibit_cursor_visibility();
+ this._cursorVisibleInhibited = true;
}
}
}
_showPointer() {
- this._cursorTracker.set_pointer_visible(true);
+ if (this._cursorVisibleInhibited) {
+ this._cursorTracker.uninhibit_cursor_visibility();
+ this._cursorVisibleInhibited = false;
+ }
if (this._motionId) {
global.stage.disconnect(this._motionId);
}
}
+ _hidePointer() {
+ if (!this._cursorVisibleInhibited) {
+ this._cursorTracker.inhibit_cursor_visibility();
+ this._cursorVisibleInhibited = true;
+ }
+ }
+
_hidePointerUntilMotion() {
this._motionId = global.stage.connect('captured-event', (stage, event) => {
if (event.type() === Clutter.EventType.MOTION)
return Clutter.EVENT_PROPAGATE;
});
- this._cursorTracker.set_pointer_visible(false);
+ this._hidePointer();
}
_hideLockScreen(animate) {